#include <stdio.h>
#include "bruch.h"
#include "helper.h"
/*
 * start.c
 *
 *  Created on: 15.08.2011
 *      Author: stephan
 */


int main() {
	char op;
	Ratio b1;
	Ratio b2;
	Ratio res;

	b1 = setBruch();
	getchar();
	scanf("%c", &op);
	b2 = setBruch();
	getchar();

	switch (op) {
	case '*':
		res = multi(b1, b2);
		break;
	case '/':
		res = divi(b1, b2);
		break;
	case '+':
		res = plus(b1, b2);
		break;
	case '-':
		res = minus(b1, b2);
		break;
	}

	print_bruch(res);

	return 0;
}
